# Hisport驱动测试构建文件

if meson_build
    message('meson build drivers')
    drivers_install_dir = meson.project_build_root() / 'opt/bmc/drivers'
    run_command('mkdir', '-p', drivers_install_dir, check: false)
else
    message('bingo build drivers')
    drivers_install_dir = 'opt/bmc/drivers/'
endif

# ABI测试
hisport_abi_test_exe = executable(
    'test_hisport_abi',
    ['../../../main.cpp', 'test_hisport_abi.cpp'],
    include_directories: [
        include_dirs,
        '../../../../drivers/bus/hisport',
        '../../../../drivers/internal',
    ],
    dependencies: [
        gtest_dep,
        test_utilities_dep,
        libmcpp_deps,
        internal_dep,
        test_utils_dep,
    ],
    cpp_args: ['-UHAVE_LIBSOC_ADAPTER'],
    link_args: ['-Wl,-rpath,' + meson.project_build_root() + '/opt/bmc/drivers'],
)
test('Hisport ABI Tests', hisport_abi_test_exe, timeout: 300, suite: 'hisport')